Page({

  /**
   * 页面的初始数据
   */
  data: {
    clearCt: "",
    nowList: [],
    finishList: [],
  },
  AddIpt(e) {
    var value = e.detail.value;
    var nowList = this.data.nowList;
    nowList.unshift(value)
    this.setData({
      clearCt: "",
      nowList
    })
  },

  check(e) {
    var nowList = this.data.nowList;
    var finishList = this.data.finishList;
    var index = e.currentTarget.dataset.index;
    finishList.unshift(nowList[index]);
    nowList.splice(index, 1);
    this.setData({
      nowList,
      finishList
    })
  },

  checked(e) {
    var nowList = this.data.nowList;
    var finishList = this.data.finishList;
    var index = e.currentTarget.dataset.index;
    nowList.push(finishList[index]);
    finishList.splice(index, 1);
    this.setData({
      nowList,
      finishList
    })
  },

  delete(e) {
    var nowList = this.data.nowList;
    var index = e.currentTarget.dataset.index;
    nowList.splice(index, 1);
    this.setData({
      nowList
    })
  },
  deleteed(e) {
    var finishList = this.data.finishList;
    var index = e.currentTarget.dataset.index;
    finishList.splice(index, 1);
    this.setData({
      finishList
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})